package eSchool.BL;

import eSchool.DataLayer.DAOFactory;
import eSchool.DataLayer.IDocenteDAO;


public class Docentes extends BasicListObject<Docente> implements IDadosEntidade {

    Docente dc = new Docente();
    
    public Docentes(){
    }
    
    public Docentes(CriteriosPesquisa criterios) throws Exception{
        this.leDados(criterios);
    }
    
    public String[][] toStringArray() {
        return null;
    }

    @Override
    public int getColumnCount() {
        return dc.getColumnCount();
    }

    @Override
    public String getColumnName(int columnIndex) {
        return dc.getColumnName(columnIndex);
    }

    @Override
    public Class<?> getColumnClass(int columnIndex) {
        return dc.getColumnClass(columnIndex);
    }
    public Object getValueAt(int rowIndex, int columnIndex){
            return this.get(rowIndex).getValueAt(0, columnIndex);
    } 

    public void setValueAt(Object aValue, int rowIndex, int columnIndex){
            this.get(rowIndex).setValueAt(aValue, 0, columnIndex);
    }

    @Override
    public void leDados() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public void leDados(CriteriosPesquisa criterios) throws Exception {
        DAOFactory factory = DAOFactory.getDAOFactory(DAOFactory.ACCESS);
        IDocenteDAO docenteDAO = factory.getDocenteDAO();           
        docenteDAO.selectDocenteTO(this, criterios);
    }

    
    @Override
    public void gravaDados() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}
